/**
 * Copyright (c) 2009 Teoti Graphix, LLC See:
 *     http://tkarchitecture.teotigraphix.org
 * 
 * Permission is hereby granted, free of charge, to any person
 * obtaining a copy of this software and associated documentation
 * files (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use,
 * copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following
 * conditions:
 * 
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
 * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
 * OTHER DEALINGS IN THE SOFTWARE.
 * 
 * @author Michael Schmalle mschmalle@teotigraphix.com
 */
package org.teotigraphix.dx.interfaces
{

import flash.display.DisplayObjectContainer;
import flash.events.IEventDispatcher;

/**
 * The <code>IToolKitManager</code> interface.
 * 
 * <p>The <strong>Bridge</strong> pattern interface used in the 
 * <code>ToolKitComponent</code> and <code>ToolKitContainer</code> classes.</p>
 * 
 * @author Michael Schmalle
 * @copyright Teoti Graphix, LLC
 * @date 07-07-09
 */
public interface IToolKitManager
{
	//--------------------------------------------------------------------------
	//
	//  IToolKitManager API :: Methods
	//
	//--------------------------------------------------------------------------
	
	/**
	 * Activates the client component.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */
	function activate(client:IToolKitComponent):void;
	
	/**
	 * Deactivates the client component.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */
	function deactivate(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component <code>skin</code> on attachment.
	 * 
	 * <p>This is usually called in <code>attachSkin()</code>.</p>
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 * @param skin The <code>IEventDispatcher</code> being attached.
	 */
	function validateSkinAttachment(client:IToolKitComponent, skin:IEventDispatcher):void;
	
	/**
	 * Validates the client component <code>skin</code> on detachment.
	 * 
	 * <p>This is usually called in <code>attachSkin()</code>.</p>
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 * @param skin The <code>IEventDispatcher</code> being attached.
	 */
	function validateSkinDetachment(client:IToolKitComponent, skin:IEventDispatcher):void;
	
	/**
	 * Validates the client component after <code>super.parentChanged()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 * @param client The client's <code>DisplayObjectContainer</code> parent.
	 */
	function validateParentChanged(
		client:IToolKitComponent, parent:DisplayObjectContainer):void;
	
	/**
	 * Validates the client component before <code>super.commitProperties()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */
	function validatePreCommitProperties(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component after <code>super.commitProperties()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */	
	function validateCommitProperties(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component after <code>super.styleChanged()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 * @param styleProp A string indicating the style property that changed.
	 */	
	function validateStyleChanged(client:IToolKitComponent, styleProp:String):void;
	
	/**
	 * Validates the client component after <code>super.stylesInitialized()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */	
	function validateStylesInitialized(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component on <code>FlexEvent.PREINITIALIZE</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */
	function validateInitialization(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component on <code>initializationComplete()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */
	function validateInitializationComplete(client:IToolKitComponent):void;
		
	/**
	 * Validates the client component after <code>super.measure()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */	
	function validateMeasure(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component after <code>super.updateDisplayList()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 * @param unscaledWidth The current unscaled width of the component.
	 * @param unscaledHeight The current unscaled height of the component.
	 */	
	function validateUpdateDisplayList(
			client:IToolKitComponent, 
			unscaledWidth:Number, unscaledHeight:Number):void;
	
	/**
	 * Validates the client component after <code>super.validateProperties()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */	
	function validateProperties(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component after <code>super.validateSize()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */	
	function validateSize(client:IToolKitComponent):void;
	
	/**
	 * Validates the client component after <code>super.validateDisplayList()</code>.
	 * 
	 * @param client An <code>IToolKitComponent</code>.
	 */	
	function validateDisplayList(client:IToolKitComponent):void;
}
}